package com.health.db.service.user.impl;
 
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.health.db.dao.user.IUserInfoDao;
import com.health.db.model.UserInfo;
import com.health.db.model.UserInfoExample;
import com.health.db.service.user.IUserInfoService;

@Component("userInfoService")
public class UserInfoServiceImpl implements IUserInfoService {

	@Autowired
	private IUserInfoDao userInfoDao;

	@Override
	public UserInfo insert(UserInfo record) {
		// TODO Auto-generated method stub
		
		userInfoDao.insert(record);
		
		return record;
	}

	@Override
	public int insertSelective(UserInfo record) {
		// TODO Auto-generated method stub
		return userInfoDao.insertSelective(record);
	}

	@Override
	public List<UserInfo> selectByExample(UserInfoExample example) {
		// TODO Auto-generated method stub
		return userInfoDao.selectByExample(example);
	}

	@Override
	public UserInfo selectByPrimaryKey(Long userId) {
		// TODO Auto-generated method stub
		return userInfoDao.selectByPrimaryKey(userId);
	}

	@Override
	public int updateByPrimaryKey(UserInfo record) {
		// TODO Auto-generated method stub
		return userInfoDao.updateByPrimaryKey(record);
	}

	@Override
	public List<UserInfo> selectByMobilePhone(String mobilePhone) {
		// TODO Auto-generated method stub
		return userInfoDao.selectByMobilePhone(mobilePhone);
	}

	@Override
	public List<UserInfo> selectByOpenId(String openId) {
		// TODO Auto-generated method stub
		return userInfoDao.selectByOpenId(openId);
	}

	public IUserInfoDao getUserInfoDao() {
		return userInfoDao;
	}

	public void setUserInfoDao(IUserInfoDao userInfoDao) {
		this.userInfoDao = userInfoDao;
	}

	@Override
	public int updateByPrimaryKeySelective(UserInfo record) {
		// TODO Auto-generated method stub
		return userInfoDao.updateByPrimaryKeySelective(record);
	}
	
}
